export const rules = {
    deptName: [
        { required: true, message: '请输入部门名称', trigger: 'blur' },
        { min: 2, max: 20, message: '请输入2-20个字符！' },
        {
            pattern: new RegExp(/^((?!\+|\.|\\|\/|:|\*|\?|\!|<|>|\||'|%|@|#|&|\$|\^|&|\*).){1,50}$/),
            message: '名称不允许包含特殊字符',
            trigger: 'blur'
        }
    ],
    deptCode: [
        { required: true, message: '请输入部门编码', trigger: 'blur' },
        { min: 2, max: 20, message: '部门编码长度2-20位', trigger: 'blur' },
    ],
    parentId: [
        { required: true, message: '请选择上级部门', trigger: 'change' }
    ],
    area: [
        { required: true, message: '请选择省市', trigger: 'change' }
    ]
}